home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / snip9611.zip / BIG_MALL.H < prev    next >
C/C++ Source or Header  |  1996-11-24  |  1KB  |  39 lines

  1. /* +++Date last modified: 08-Sep-1996 */
  2.  
  3. /*
  4. ** void FAR *BigMalloc(Size_T num_elem, Size_T size_elem);
  5. ** void BigFree(void FAR *ptr);
  6. */
  7.  
  8. #ifndef BIG_MALL__H
  9. #define BIG_MALL__H
  10.  
  11. #include "extkword.h"
  12.  
  13. #if (defined(MSDOS) || defined(__MSDOS__)) && !defined(__FLAT__)
  14.  #if defined(__TURBOC__) || defined(__POWERC) || defined(__ZTC__)
  15.   #if defined(__ZTC__)
  16.    #include <dos.h>
  17.   #else     /* Borland or Mix */
  18.    #include <alloc.h>
  19.   #endif
  20.   typedef unsigned long Size_T;
  21.   #define BigMalloc(i,n) (void FAR *)farmalloc((Size_T)(i)*(Size_T)(n))
  22.   #define BigFree(p) farfree(p)
  23.  #else                                          /* MSC, Watcom    */
  24.   #include <malloc.h>
  25.   #include <stddef.h>                           /* for size_t     */
  26.   typedef size_t Size_T;
  27.   #define BigMalloc(i,n) (void FAR *)halloc((Size_T)(i),(Size_T)(n))
  28.   #define BigFree(p) hfree(p)
  29.  #endif
  30. #else
  31.  #include <stdlib.h>
  32.  #include <stddef.h>                            /* for size_t     */
  33.  typedef size_t Size_T;
  34.  #define BigMalloc(i,n) malloc((Size_T)(i)*(Size_T)(n))
  35.  #define BigFree(p) free(p)
  36. #endif
  37.  
  38. #endif /* BIG_MALL__H */
  39.